Object.defineProperty(exports, "__esModule", {
    value: !0
}), exports.getUsing = function(e, r) {
    if (!r) return {};
    var n = {};
    return r.forEach(function(r, o) {
        var c, f, i, a;
        "string" == typeof r || "string" != typeof (f = r[c = Object.keys(r)[0]]) && ("string" == typeof (i = f[0]) ? (r = t(e, i), 
        n[c] = f[1] ? f[1](r) : r) : (a = [], i.forEach(function(r) {
            a.push(t(e, r));
        }), n[c] = f[1].apply(null, a)));
    }), n;
}, exports.getTargetByPath = t, exports.getPath = function(t) {
    if ("[object Array]" !== Object.prototype.toString.call(t)) return e(t);
    var r = {};
    return t.forEach(function(t) {
        "string" == typeof t || "string" == typeof (t = t[Object.keys(t)[0]]) ? r[t] = !0 : "string" == typeof t[0] ? r[t[0]] = !0 : t[0].forEach(function(t) {
            return r[t] = !0;
        });
    }), r;
}, exports.getUpdatePath = e, exports.needUpdate = function(t, e) {
    for (var r in t) {
        if (e[r]) return !0;
        for (var n in e) if (o(r, n)) return !0;
    }
    return !1;
}, exports.fixPath = function(t) {
    var e = "";
    return t.replace("#-", "").split("-").forEach(function(t, r) {
        r ? isNaN(Number(t)) ? e += "." + t : e += "[" + t + "]" : e += t;
    }), e;
};

function t(t, e) {
    for (var r = e.replace(/]/g, "").replace(/\[/g, ".").split("."), n = t, o = 0, c = r.length; o < c; o++) n = n[r[o]];
    return n;
}

function e(t) {
    var e, o, c = {};
    return e = t, o = c, Object.keys(e).forEach(function(t) {
        o[t] = !0;
        var c = Object.prototype.toString.call(e[t]);
        "[object Object]" === c ? r(e[t], t, o) : "[object Array]" === c && n(e[t], t, o);
    }), c;
}

function r(t, e, o) {
    Object.keys(t).forEach(function(c) {
        o[e + "." + c] = !0, delete o[e];
        var f = Object.prototype.toString.call(t[c]);
        "[object Object]" === f ? r(t[c], e + "." + c, o) : "[object Array]" === f && n(t[c], e + "." + c, o);
    });
}

function n(t, e, o) {
    t.forEach(function(t, c) {
        o[e + "[" + c + "]"] = !0, delete o[e];
        var f = Object.prototype.toString.call(t);
        "[object Object]" === f ? r(t, e + "[" + c + "]", o) : "[object Array]" === f && n(t, e + "[" + c + "]", o);
    });
}

function o(t, e) {
    return 0 === t.indexOf(e) && ("[" === (e = t.substr(e.length, 1)) || "." === e);
}